home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
asmsrc
/
thesource-7.lha
/
Source
/
Articles
/
Stereoscopic
/
Stereo.lha
/
objects.h
next >
Wrap
Text File
|
1994-06-11
|
6KB
|
213 lines
/* Name : demo.c
*
* Notes:
*
* $Log: objects.h,v $
* Revision 1.2 1994/06/03 18:24:02 idr
* Added new objects.
*
* Revision 1.1 1994/04/19 18:12:16 idr
* Initial revision
*
*/
/******************************************************************************/
const Point3D CubePts[] =
{
{ 0x100, 0x100, 0x100 },
{ -0x100, 0x100, 0x100 },
{ -0x100,-0x100, 0x100 },
{ 0x100,-0x100, 0x100 },
{ 0x100, 0x100,-0x100 },
{ -0x100, 0x100,-0x100 },
{ -0x100,-0x100,-0x100 },
{ 0x100,-0x100,-0x100 },
};
const WORD CubeSPts[] =
{
1, 2, 3, 4,
8, 7, 6, 5,
6, 2, 1, 5,
7, 8, 4, 3,
6, 7, 3, 2,
1, 4, 8, 5,
};
const Surface CubeSurfs[] =
{
{ &CubeSurfs[1], 4, &CubeSPts[0] },
{ &CubeSurfs[2], 4, &CubeSPts[4] },
{ &CubeSurfs[3], 4, &CubeSPts[8] },
{ &CubeSurfs[4], 4, &CubeSPts[12] },
{ &CubeSurfs[5], 4, &CubeSPts[16] },
{ NULL, 4, &CubeSPts[20] },
};
const Object3D Cube =
{
8, CubePts,
CubeSurfs
};
/******************************************************************************/
const Point3D CylinderPts[] =
{
{ 0x0000,0x0100,0x0100 }, { 0x004b,0x00f5,0x0100 },
{ 0x0090,0x00d4,0x0100 }, { 0x00c8,0x00a0,0x0100 },
{ 0x00ee,0x005e,0x0100 }, { 0x00ff,0x0014,0x0100 },
{ 0x00fa,0xffc8,0x0100 }, { 0x00de,0xff81,0x0100 },
{ 0x00af,0xff45,0x0100 }, { 0x0071,0xff1a,0x0100 },
{ 0x0028,0xff03,0x0100 }, { 0xffdc,0xff03,0x0100 },
{ 0xff93,0xff18,0x0100 }, { 0xff54,0xff43,0x0100 },
{ 0xff24,0xff7e,0x0100 }, { 0xff07,0xffc4,0x0100 },
{ 0xff01,0x0010,0x0100 }, { 0xff11,0x005a,0x0100 },
{ 0xff36,0x009d,0x0100 }, { 0xff6d,0x00d1,0x0100 },
{ 0x0000,0x0100,-0x0100 }, { 0x004b,0x00f5,-0x0100 },
{ 0x0090,0x00d4,-0x0100 }, { 0x00c8,0x00a0,-0x0100 },
{ 0x00ee,0x005e,-0x0100 }, { 0x00ff,0x0014,-0x0100 },
{ 0x00fa,0xffc8,-0x0100 }, { 0x00de,0xff81,-0x0100 },
{ 0x00af,0xff45,-0x0100 }, { 0x0071,0xff1a,-0x0100 },
{ 0x0028,0xff03,-0x0100 }, { 0xffdc,0xff03,-0x0100 },
{ 0xff93,0xff18,-0x0100 }, { 0xff54,0xff43,-0x0100 },
{ 0xff24,0xff7e,-0x0100 }, { 0xff07,0xffc4,-0x0100 },
{ 0xff01,0x0010,-0x0100 }, { 0xff11,0x005a,-0x0100 },
{ 0xff36,0x009d,-0x0100 }, { 0xff6d,0x00d1,-0x0100 },
};
const WORD CylinderSPts[] =
{
20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1, 2, 22, 21,
2, 3, 23, 22,
3, 4, 24, 23,
4, 5, 25, 24,
5, 6, 26, 25,
6, 7, 27, 26,
7, 8, 28, 27,
8, 9, 29, 28,
9, 10, 30, 29,
10, 11, 31, 30,
11, 12, 32, 31,
12, 13, 33, 32,
13, 14, 34, 33,
14, 15, 35, 34,
15, 16, 36, 35,
16, 17, 37, 36,
17, 18, 38, 37,
18, 19, 39, 38,
19, 20, 40, 39,
20, 1, 21, 40,
};
const Surface CylinderSurfs[] =
{
{ &CylinderSurfs[1], 20, &CylinderSPts[0] },
{ &CylinderSurfs[2], 20, &CylinderSPts[20] },
{ &CylinderSurfs[3], 4, &CylinderSPts[40] },
{ &CylinderSurfs[4], 4, &CylinderSPts[44] },
{ &CylinderSurfs[5], 4, &CylinderSPts[48] },
{ &CylinderSurfs[6], 4, &CylinderSPts[52] },
{ &CylinderSurfs[7], 4, &CylinderSPts[56] },
{ &CylinderSurfs[8], 4, &CylinderSPts[60] },
{ &CylinderSurfs[9], 4, &CylinderSPts[64] },
{ &CylinderSurfs[10], 4, &CylinderSPts[68] },
{ &CylinderSurfs[11], 4, &CylinderSPts[72] },
{ &CylinderSurfs[12], 4, &CylinderSPts[76] },
{ &CylinderSurfs[13], 4, &CylinderSPts[80] },
{ &CylinderSurfs[14], 4, &CylinderSPts[84] },
{ &CylinderSurfs[15], 4, &CylinderSPts[88] },
{ &CylinderSurfs[16], 4, &CylinderSPts[92] },
{ &CylinderSurfs[17], 4, &CylinderSPts[96] },
{ &CylinderSurfs[18], 4, &CylinderSPts[100] },
{ &CylinderSurfs[19], 4, &CylinderSPts[104] },
{ &CylinderSurfs[20], 4, &CylinderSPts[108] },
{ &CylinderSurfs[21], 4, &CylinderSPts[112] },
{ NULL, 4, &CylinderSPts[116] },
};
const Object3D Cylinder =
{
40, CylinderPts,
CylinderSurfs
};
/******************************************************************************/
const Point3D VasePts[] =
{
{ 0x00d0, 0x0100, -0x00d0 },
{ 0x00d0, 0x0100, 0x00d0 },
{ -0x00d0, 0x0100, 0x00d0 },
{ -0x00d0, 0x0100, -0x00d0 },
{ 0x0080, 0x0000, -0x0080 },
{ 0x0080, 0x0000, 0x0080 },
{ -0x0080, 0x0000, 0x0080 },
{ -0x0080, 0x0000, -0x0080 },
{ 0x0100, -0x0080, -0x0100 },
{ 0x0100, -0x0080, 0x0100 },
{ -0x0100, -0x0080, 0x0100 },
{ -0x0100, -0x0080, -0x0100 },
};
const WORD VaseSurfPts[] =
{
/* Top */
4, 3, 2, 1,
/* Bottom */
9, 10, 11, 12,
/* Front */
2, 6, 5, 1,
6, 10, 9, 5,
/* Side 1 */
3, 7, 6, 2,
7, 11, 10, 6,
/* Side 2 */
8, 4, 1, 5,
12, 8, 5, 9,
/* Back */
4, 8, 7, 3,
8, 12, 11, 7,
};
const Surface VaseSurfs[] =
{
{ &VaseSurfs[1], 4, &VaseSurfPts[ 0] },
{ &VaseSurfs[2], 4, &VaseSurfPts[ 4] },
{ &VaseSurfs[3], 4, &VaseSurfPts[ 8] },
{ &VaseSurfs[4], 4, &VaseSurfPts[12] },
{ &VaseSurfs[5], 4, &VaseSurfPts[16] },
{ &VaseSurfs[6], 4, &VaseSurfPts[20] },
{ &VaseSurfs[7], 4, &VaseSurfPts[24] },
{ &VaseSurfs[8], 4, &VaseSurfPts[28] },
{ &VaseSurfs[9], 4, &VaseSurfPts[32] },
{ NULL, 4, &VaseSurfPts[36] },
};
const Object3D Vase =
{
12, VasePts,
VaseSurfs
};